package chapter1016;

public class Student {
    private String name;
    private String gender;
    private int age;
    private int id;
    private double score;

    public Student(String name, String gender, int age, int id, double score) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.id = id;
        this.score = score;
    }

    public Student() {

    }

    public String getName() {
        return name;
    }

    public String getGender() {
        return gender;
    }

    public int getAge() {
        return age;
    }

    public int getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public double getScore() {
        return score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", id=" + id +
                ", score=" + score +
                '}';
    }

    public String info() {
        return "Student{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", id=" + id +
                ", score=" + score +
                '}';
    }

}

class TestStudent{
    public static void main(String[] args) {
        Student s = new Student();
//        s.name = "1";
        s.setName("1");
        s.setGender("女");
        s.setAge(16);
        s.setId(1323);
        s.setScore(100);

        Student s2 = new Student("1","男",18,2313,95.5);

        System.out.println(s.info());
        System.out.println(s2.info());
    }
}
